﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="StoreGoodADD.aspx.cs" Inherits="Admin_shop_UpImgDemo"  validateRequest="false"%>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>商品添加</title>
   
     <link href="../css/bootstrap.min.css?v=3.3.6" rel="stylesheet"/>
    <link href="../css/font-awesome.css?v=4.4.0" rel="stylesheet"/>
    <link href="../css/animate.css" rel="stylesheet"/>
    <link href="../css/style.css?v=4.1.0" rel="stylesheet"/>
    <link href="../css/plugins/iCheck/custom.css" rel="stylesheet"/>   
    <script src="../js/jquery.min.js?v=2.1.4"></script>

    
    <link href="../50/imgup.css" rel="stylesheet" />
    <link href="../50/style.css" rel="stylesheet" />
    <script src="../50/function.js"></script>


    <script type="text/javascript" src="../../kingEditor/kindeditor.js"></script>
    <script charset="utf-8" src="../../kingEditor/lang/zh_CN.js"></script>    




    <style type="text/css">
  .imgbox img
        {
            width: 160px;
            height: 160px;
            border:1px solid #ccc;
        }
    </style>
    <script>
        var editor;
        KindEditor.ready(function (K) {
            editor = K.create('#txtContent', {
                resizeType: 2,
                uploadJson: '../../../api/Tools/upload_json.ashx', // 相对于当前页面的路径
                fileManagerJson: '../../../api/Tools/file_manager_json.ashx',
                allowFileManager: true
            });
        });

        
    </script>
</head>
<body>
    <form id="form1" runat="server" class="form-horizontal m-t">
        <div class="wrapper animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">          
                    <div class="ibox-content">
                       <div class="panel-body">
                      <div class="form-group">
                          <div class="col-sm-12" style="margin-top: 1em;">
                              <label class="col-sm-2 control-label">商品分类：</label>
                              <div class="col-sm-6">
                                  <asp:DropDownList ID="aClassddl" class="form-control" runat="server">
                                  </asp:DropDownList>
                              </div>
                          </div>

                    


                              <div class="col-sm-12" style="margin-top: 1em;">
                                    <label class="col-sm-2 control-label">商家：</label>
                                    <div class="col-sm-6">
                                        <asp:DropDownList ID="childClassId" class="form-control" required="" aria-required="true" runat="server">
                                        </asp:DropDownList>
                                    </div>
                                </div>




                          <div class="col-sm-12" style="margin-top: 1em;">
                              <label class="col-sm-2 control-label">商品名称：</label>
                              <div class="col-sm-4">
                                  <asp:TextBox ID="txtName" runat="server" class="form-control" required="" aria-required="true"
                                      MaxLength="50" HintTitle="商品名称" HintInfo="控制在50个字数内，如“玫瑰花”。"></asp:TextBox>
                                  
                              </div>

                                <%--<div class="col-sm-4">
                                     <label class="col-sm-4 control-label">会员商品：</label>
                             <asp:CheckBox ID="CBLog"  runat="server" Checked="false"  CssClass="checkbox-inline i-checks" />选中后，购买该产品可以成为会员！
                                 </div>



                                 <div class="col-sm-4">
                                     <label class="col-sm-4 control-label">虚拟产品：</label>
                             <asp:CheckBox ID="CBxn"  runat="server" Checked="false"  CssClass="checkbox-inline i-checks" />选中后，不需物流！
                                 </div>--%>
                          </div>



                             <div class="col-sm-12" style="margin-top: 1em;">
                                    <label class="col-sm-2 control-label">商品图片：</label>
                                    <div class="col-sm-6">
                                        <ul class="upload-ul clearfix">
                                            <li class="upload-pick">
                                                <div class="webuploader-container clearfix" id="goodsUpload" style="background: none;"></div>
                                            </li>
                                        </ul>
                                        <input type="text" id="xsimg" runat="server" value="" style="display: none;" />
                                        <input type="text" id="myimgTxt" runat="server" value="" style="display: none;" />
                                    </div>
                                    <span style="position: absolute; bottom: -3%; left: 19%;">建议尺寸670x380PX，jpg、jpeg格式，图片小于300kb</span>
                                </div>







                          <div class="col-sm-12" style="margin-top: 1em;">
                              <label class="col-sm-2 control-label">商品介绍：</label>
                              <div class="col-sm-6">
                                  <asp:TextBox ID="txtKeyword" runat="server" CssClass="form-control" aria-required="true" required=""
                                      MaxLength="300" HintTitle="商品介绍" HintInfo="请填写商品介绍，控制在100字以内。"
                                   
         TextMode="MultiLine"
                                      ></asp:TextBox>
                              </div>
                          </div>

                          <div class="col-sm-12" style="margin-top: 1em;">
                              <label class="col-sm-2 control-label">商品详细：</label>
                              <div class="col-sm-10">
                                  <textarea id="txtContent" cols="100" rows="8" style="width: 100%; height: 400px; visibility: hidden;" runat="server"></textarea>

                              </div>
                          </div>

                            <div class="col-sm-12" style="margin-top: 1em;">
                             
                          </div>

                          <div class="col-sm-12" style="margin-top: 1em;">

                               <label class="col-sm-2 control-label">市场价格：</label>
                              <div class="col-sm-1">
                                  <asp:TextBox ID="GPriceYJ" runat="server" CssClass="form-control" required="" aria-required="true"
                                      MaxLength="50" HintTitle="商品市场价" 
                                      HintInfo="请填写数字" ></asp:TextBox>
                              </div>
                        
                                <label class="col-sm-2 control-label">商城价格：</label>
                              <div class="col-sm-1">
                                  
                                  <asp:TextBox ID="SPrice" runat="server" CssClass="form-control" required="" aria-required="true"
                                      MaxLength="50" HintTitle="商城销售价格"
                                      HintInfo="请填写数字" ></asp:TextBox>
                              </div>

                               <label class="col-sm-2 control-label">会员价格：</label>
                              <div class="col-sm-1">
                                  <asp:TextBox ID="SPrice2" runat="server" CssClass="form-control" required="" aria-required="true"
                                      MaxLength="50" HintTitle="会员价格"
                                      HintInfo="请填写数字" >0</asp:TextBox>
                              </div>

                              <label class="col-sm-2 control-label">邮费：</label>
                              <div class="col-sm-1">
                                  <asp:TextBox ID="SPrice3" runat="server" CssClass="form-control" required="" aria-required="true" MaxLength="50" HintTitle="邮费" HintInfo="请填写数字" >0</asp:TextBox>
                              </div>
                          </div>


                         


                           <%--<div class="col-sm-12" style="margin-top: 1em;">
                              <label class="col-sm-2 control-label">1级会员分销返点：</label>
                              <div class="col-sm-1">
                                  <asp:TextBox ID="fxPrice" runat="server" CssClass="form-control" required="" aria-required="true"
                                      MaxLength="50" HintTitle="1级会员分销返点"
                                      HintInfo="填写数字几，就代表百分之几。例如：填6，就是返点6%。填0，表示不返点。" ></asp:TextBox>%
                              </div>
                          </div>

                            <div class="col-sm-12" style="margin-top: 1em;">
                              <label class="col-sm-2 control-label">2级会员分销返点：</label>
                              <div class="col-sm-1">
                                  <asp:TextBox ID="fxPrice2" runat="server" CssClass="form-control" required="" aria-required="true" MaxLength="50" HintTitle="填写数字几，就代表百分之几。例如：填6，就是返点6%。填0，表示不返点。" HintInfo="请填写数字" ></asp:TextBox>%
                              </div>
                          </div>

                          
                            <div class="col-sm-12" style="margin-top: 1em;">
                              <label class="col-sm-2 control-label">3级会员分销返点：</label>
                              <div class="col-sm-1">
                                  <asp:TextBox ID="fxPrice3" runat="server" CssClass="form-control" required="" aria-required="true" MaxLength="50" HintTitle="3级会员分销返点" HintInfo="填写数字几，就代表百分之几。例如：填6，就是返点6%.填0，表示不返点。" ></asp:TextBox>%
                              </div>
                          </div>--%>

                          <div class="col-sm-12" style="margin-top: 1em;">
                              <label class="col-sm-2 control-label">商品库存：</label>
                              <div class="col-sm-1" >
                                  <asp:TextBox ID="GCounts" runat="server" CssClass="form-control" required="" aria-required="true"
                                      MaxLength="50" HintTitle="商品库存"
                                      HintInfo="商品库存，为整数" >999</asp:TextBox>
                              </div>
                              
                              <label class="col-sm-2 control-label">销售量：</label>
                              <div class="col-sm-1">
                                  <asp:TextBox ID="GSales" runat="server" CssClass="form-control" required="" aria-required="true" HintTitle="销售量" HintInfo="销售量" >999</asp:TextBox>
                              </div>

                              <label class="col-sm-2 control-label">商品排序：</label>
                              <div class="col-sm-1">
                                  <asp:TextBox ID="GSort" runat="server" CssClass="form-control" required="" aria-required="true"
                                      MaxLength="500" HintTitle="商品排序"
                                      HintInfo="请填写数字" >1</asp:TextBox>
                              </div>

                              
                              <label class="col-sm-2 control-label">商品单位：</label>
                                <div class="col-sm-1">
                                  <asp:TextBox ID="Gdw" runat="server" CssClass="form-control" required="" aria-
                                      MaxLength="500" HintTitle="单位"
                                      HintInfo="请填单位" ></asp:TextBox>
                              </div>

                          </div>

                          <%--<div class="col-sm-12" style="margin-top: 1em;">
                              <label class="col-sm-2 control-label">商品区域：</label>
                              <div class="col-sm-1">
                                  <asp:DropDownList ID="DropDownList1" runat="server">
                                      <asp:ListItem Value="0">请选择</asp:ListItem>
                                      <asp:ListItem Value="1">A区</asp:ListItem>
                                      <asp:ListItem Value="2">B区</asp:ListItem>
                                      <asp:ListItem Value="3">C区</asp:ListItem>
                                  </asp:DropDownList>
                              </div>
                          </div>--%>

                          <div class="form-group" style="margin-top: 2em;">
                              <div class="col-sm-8 col-sm-offset-3" style="margin-top: 2em;">
                                  <asp:Button ID="btnSave" runat="server" Text="确认保存" CssClass="btn btn-primary" OnClick="btnSave_Click"  OnClientClick="setValue()"/>
                                  &nbsp;
  <input type="button" class="btn btn-primary" id="btnCancel" value="取消" onclick="myclose();" />
                              </div>
                          </div>

    <div style="margin-top:10px;text-align:center;">


        </div>
                        </div>
                    </div>
                </div>
            </div>
         </div>
    </div>     
        </form>
        <!-- 全局js -->

    <script src="../js/bootstrap.min.js?v=3.3.6"></script>
   <link href="../css/plugins/sweetalert/sweetalert.css" rel="stylesheet" />
    <script src="../Js/plugins/sweetalert/sweetalert.min.js"></script>

                <!-- iCheck -->
    <script src="../js/plugins/iCheck/icheck.min.js"></script>
    <script>
        $(document).ready(function () {
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green'

            });
        });
    </script>




     <!-- 上传图片js -->
    <link href="/js/webUpload_Img/imgup.css" rel="stylesheet" />
    <script src="/js/webUpload_Img/mDialog.js"></script>
    <script src="/js/webUpload_Img/webUpload.js"></script>
    <script src="/js/webUpload_Img/webuploader.min.js"></script>
    <script src="/js/layer-v3.1.1/layer/layer.js"></script>
    <script>
        $(document).ready(function () {
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green'
            });
        });

        $(function () {
            $('#goodsUpload').diyUpload({
                picList: '<%=imgArr%>',
                picTxtList: '<%=imgTxtArr%>',
                IsBackImg: true,
                IsBackTxt: false,
                IsOneTmg: false,
                IsNotMod: false
            });
        });
        function setValue() {
            var myimg = "|";
            var myimgTxt = "|";
            $(".upload-ul").find('li').each(function (index, item) {
                if (typeof ($(this).attr("mya")) != "undefined" && $(this).attr("mya") != "NaN") {
                    myimg += $(this).attr("mya") + "|";
                    if (typeof ($(this).attr("title")) != "undefined")
                        myimgTxt += $(this).attr("title") + "|";
                    else
                        myimgTxt += "|";
                }
            });

            $("#xsimg").val(myimg);
            $("#myimgTxt").val(myimgTxt);
        }


        $(document).ready(function () {
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green'
            });
        });
    </script>

    <script type="text/javascript">



        if (typeof (success) != "undefined") {

            swal({ title: msg, type: "success", html: true, confirmButtonText: "成 功", showConfirmButton: true, timer: 1000 }
                        , function(isConfirm) {

                            if (isConfirm) {
                                swal("Deleted!", "Your imaginary file has been deleted.", "success");

                            }
                            else {
                                var index = parent.layer.getFrameIndex(window.name); //获取当前窗体索引

                                if (typeof (index) != "undefined") {
                                    parent.layer.close(index); //执行关闭

                                }
                                else {
                                    parent.openItem(successurl, 1, '资讯管理');

                                }

                            }


                        }


                       );
        }
        function myclose() {
            var index = parent.layer.getFrameIndex(window.name); //获取当前窗体索引
            parent.layer.close(index); //执行关闭
        }

    
    
    </script>
</body>
</html>
